package org.apache.servicecomb.samples.practise.houserush.sale.dao;

import org.apache.servicecomb.samples.practise.houserush.sale.aggregate.Favorite;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author: Snake Man
 * @system:
 * @DateTime: 2022/1/20 21:31
 * @Description:
 */
public interface FavoriteDao extends JpaRepository<Favorite,Integer> {

    List<Favorite> findAllByCustomerId(int customerId);

    int countByCustomerIdAndHouseOrderId(int customerId, int houseOrderId);
}
